package com.artifact.mit.mypoint.activity;

import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.artifact.mit.mypoint.R;
import com.artifact.mit.mypoint.adapter.PointConnectorAdapter;
import com.artifact.mit.mypoint.model.PointConnector;

public class PointConnectorActivity extends ListFragment {
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return inflater.inflate(R.layout.point_connector, null);
	}
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		PointConnectorAdapter adapter = new PointConnectorAdapter(getActivity());
		adapter.add(new PointConnector(R.drawable.gff, "Garuda Frequent Flyer", "Electronic"));
		adapter.add(new PointConnector(R.drawable.acehardware, "Ace Hardware", "Camera, Furniture"));
		adapter.add(new PointConnector(R.drawable.blibli, "BliBli", "Electronic, Camera, Furniture"));
		adapter.add(new PointConnector(R.drawable.toyskingdom, "Toys Kingdom", "Furniture"));
		adapter.add(new PointConnector(R.drawable.centro, "Centro", "Computer, Phone"));
		getListView().setAdapter(adapter);
	}
}
